import { RouteRecordRaw } from 'vue-router';

 
//通过vue-router插件实现模板路由配置
import { createRouter, createWebHashHistory } from 'vue-router'
import login from '@/views/login.vue'
import home from '@/views/home.vue'
import sysIndex from '@/views/sysIndex.vue'
import Control from '@/views/Control/Control.vue'
import homePage from '@/views/homePage.vue'
import user from '@/views/Setting/user/user.vue'
import cabinet from '@/views/Setting/cabinet/cabinet.vue'
import interfaces from '@/views/Setting/interfaces/interfaces.vue'
import printSetting from '@/views/Setting/printSetting.vue'
import repository from '@/views/Setting/repository/repository.vue'
import shelfDefine from '@/views/Setting/shelfDefine/shelfDefine.vue'
import device from '@/views/Setting/device/device.vue'
import loginLog from '@/views/system/loginLog.vue'
import optLog from '@/views/system/optLog.vue'
import role from '@/views/Setting/role/role.vue'
import vform from '@/components/vform.vue'
import newArchives from '@/views/rfid/newArchives.vue'
import newBox from '@/views/rfid/newBox.vue'
import brand from '@/views/Setting/brand/brand.vue'
import customFields from '@/views/Setting/customFields/customFields.vue'
import personal from '@/views/system/editPassword.vue'
import dictionary from '@/views/Setting/dictionary/dictionary.vue'
import amsCar from '@/views/WorkHome/amsCar.vue'
import trafficData from '@/views/WorkHome/trafficData.vue'
import workDesk from '@/views/WorkHome/workDesk.vue'
import dept from '@/views/Setting/dept/dept.vue'
import upBill from '@/views/rfid/upBill.vue'
import downBill from '@/views/rfid/downBill.vue'
import recordBill from '@/views/rfid/recordBill.vue'
import recordLibrary from '@/views/rfid/recordLibrary.vue'
import destroyBill from '@/views/rfid/destroyBill.vue'
import destroyLibrary from '@/views/rfid/destroyLibrary.vue'
import locationChange from '@/views/rfid/locationChange.vue'
import archivesOut from '@/views/rfid/archivesOut.vue'
import boxOut from '@/views/rfid/boxOut.vue'
import outBill from '@/views/rfid/outBill.vue'
import archivesIn from '@/views/rfid/archivesIn.vue'
import boxIn from '@/views/rfid/boxIn.vue'
import inBill from '@/views/rfid/inBill.vue'
import overdue from '@/views/rfid/overdue.vue'
import upShelves from '@/views/rfid/upShelves.vue'
import downShelves from '@/views/rfid/downShelves.vue'
import archivesMove from '@/views/rfid/archivesMove.vue'
import boxMove from '@/views/rfid/boxMove.vue'
import boxReplace from '@/views/rfid/boxReplace.vue'
import boxReplaceRecord from '@/views/rfid/boxReplaceRecord.vue'
import unboxingRecord from '@/views/rfid/unboxingRecord.vue'
import createInventoryCheck from '@/views/rfid/createInventoryCheck.vue'
import inventoryBill from '@/views/rfid/inventoryBill.vue'
import labelReplace from '@/views/rfid/labelReplace.vue'
import archiveLabelReplace from '@/views/rfid/archiveLabelReplace.vue'
import boxLabelReplace from '@/views/rfid/boxLabelReplace.vue'
import shelfSignReplacement from '@/views/rfid/shelfSignReplacement.vue'
import archivesQuery from '@/views/statistics/archivesQuery.vue'
import boxQuery from '@/views/statistics/boxQuery.vue'
import houseOverview from '@/views/VirtualHouse/houseOverview.vue'
import systemConfig from '@/views/Setting/systemConfig/systemConfig.vue'
import backups from '@/views/system/backups.vue'
import printRackLabel from '@/views/rfid/printRackLabel.vue'
import amsStat from '@/views/statistics/amsStat/amsStat.vue'
import delayedReturn from '@/views/system/delayedReturn.vue'
import serviceSetting from '@/views/Setting/serviceSetting/serviceSetting.vue'


 
//对外暴露配置路由
export const routes: Array<RouteRecordRaw> = [
 { path: '/', component: sysIndex },
  {
    path: '/home',
    component: home,
    meta: { isAout: true },
    children: [
      {
        path: '/Control',
        name: 'Control',
        component: Control,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },

      {
        path: '/homePage',
        name: 'homePage',
        component: homePage,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/user',
        name: 'user',
        component: user,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/cabinet',
        component: cabinet,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/device',
        name: 'device',
        component: device,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/shelfDefine',
        name: 'shelfDefine',
        component: shelfDefine,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/interfaces',
        name: 'interfaces',
        component: interfaces,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/printSetting',
        name: 'printSetting',
        component: printSetting,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/repository',
        name: 'repository',
        component: repository,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/role',
        name: 'role',
        component: role,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/vform',
        name: 'vform',
        component: vform,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/loginLog',
        name: loginLog,
        component: loginLog,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/optLog',
        name: 'optLog',
        component: optLog,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/brand',
        name: 'brand',
        component: brand,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/customFields',
        name: 'customFields',
        component: customFields,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/personal',
        name: 'personal',
        component: personal,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/dictionary',
        name: 'dictionary',
        component: dictionary,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/amsCar',
        name: 'amsCar',
        component: amsCar,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/trafficData',
        name: 'trafficData',
        component: trafficData,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/workDesk',
        name: 'workDesk',
        component: workDesk,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/dept',
        name: 'dept',
        component: dept,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/serviceSetting',
        name: 'serviceSetting',
        component: serviceSetting,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/newArchives',
        name: 'newArchives',
        component: newArchives,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/newBox',
        name: 'newBox',
        component: newBox,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/upBill',
        name: 'upBill',
        component: upBill,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/downBill',
        name: 'downBill',
        component: downBill,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/recordBill',
        name: 'recordBill',
        component: recordBill,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/recordLibrary',
        name: 'recordLibrary',
        component: recordLibrary,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/destroyBill',
        name: 'destroyBill',
        component: destroyBill,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/destroyLibrary',
        name: 'destroyLibrary',
        component: destroyLibrary,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/locationChange',
        name: 'locationChange',
        component: locationChange,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/archivesOut',
        name: 'archivesOut',
        component: archivesOut,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/boxOut',
        name: 'boxOut',
        component: boxOut,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/outBill',
        name: 'outBill',
        component: outBill,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/archivesIn',
        name: 'archivesIn',
        component: archivesIn,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/boxIn',
        name: 'boxIn',
        component: boxIn,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/inBill',
        name: 'inBill',
        component: inBill,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/overdue',
        name: 'overdue',
        component: overdue,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/upShelves',
        name: 'upShelves',
        component: upShelves,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/downShelves',
        name: 'downShelves',
        component: downShelves,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/archivesMove',
        name: 'archivesMove',
        component: archivesMove,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/boxMove',
        name: 'boxMove',
        component: boxMove,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/boxReplace',
        name: 'boxReplace',
        component: boxReplace,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/boxReplaceRecord',
        name: 'boxReplaceRecord',
        component: boxReplaceRecord,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/unboxingRecord',
        name: 'unboxingRecord',
        component: unboxingRecord,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/createInventoryCheck',
        name: 'createInventoryCheck',
        component: createInventoryCheck,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/inventoryBill',
        name: 'inventoryBill',
        component: inventoryBill,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/labelReplace',
        name: 'labelReplace',
        component: labelReplace,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/archiveLabelReplace',
        name: 'archiveLabelReplace',
        component: archiveLabelReplace,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/boxLabelReplace',
        name: 'boxLabelReplace',
        component: boxLabelReplace,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/shelfSignReplacement',
        name: 'shelfSignReplacement',
        component: shelfSignReplacement,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/archivesQuery',
        name: 'archivesQuery',
        component: archivesQuery,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/boxQuery',
        name: 'boxQuery',
        component: boxQuery,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/houseOverview',
        name: 'houseOverview',
        component: houseOverview,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/systemConfig',
        name: 'systemConfig',
        component: systemConfig,
      },
      {
        path: '/backups',
        name: 'backups',
        component: backups,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/printRackLabel',
        name: 'printRackLabel',
        component: printRackLabel,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/amsStat',
        name: 'amsStat',
        component: amsStat,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
      {
        path: '/delayedReturn',
        component: delayedReturn,
        meta: { requireAuth: true, keepAlive: true }, // 需要登录态并且保留状态
      },
    ],
  },
]
//创建路由器
const router = createRouter({
  //路由模式根据需求选择
  history: createWebHashHistory(),
  routes: routes,
})
export default router